//
//  MaineJournalAppDelegate.h
//  MaineJournal
//
//  Created by Administrator on 8/15/11.
//  Copyright 2011 University of Maine. All rights reserved.
//

#import "RatingViewController.h"
#import "Defaults.h"

@implementation RatingViewController

- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
  return YES;
}

- (IBAction) remindLater:(id)sender {
  [[NSUserDefaults standardUserDefaults] setInteger:0 forKey:kDefaultUserKey_LaunchCount];
  
  [self.parentViewController dismissModalViewControllerAnimated:YES];
}

- (IBAction) ignore:(id)sender {
  [[NSUserDefaults standardUserDefaults] setInteger:-1 forKey:kDefaultUserKey_LaunchCount];
  
  [self.parentViewController dismissModalViewControllerAnimated:YES];
}

- (IBAction) rateNow:(id)sender {
  [[NSUserDefaults standardUserDefaults] setInteger:-1 forKey:kDefaultUserKey_LaunchCount];
  
  [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"iTunesURL"]]];
  [self.parentViewController dismissModalViewControllerAnimated:NO];
}

@end
